package lance.honeydew.dao;

import org.hibernate.Session;

import lance.honeydew.bean.CategoryMedium;
import lance.honeydew.bean.PublishMessage;
import lance.honeydew.bean.ShoppingMoney;
import lance.honeydew.bean.UserMember;

public class ShoppingMoneyDAO extends RootDAO {
	
	/**
	 * findShoppingMoneyBySeqId
	 * @param seqId
	 * @return
	 */
	public ShoppingMoney findShoppingMoneyBySeqId(Long seqId) {
		
		ShoppingMoney result = null;
		
		try {
			
			String sqlString = " select s from ShoppingMoney s " +
					" inner join fetch s.Userid u where 1=1 " +
					" and s.Seqid = " + seqId + " ";
			Session session = getSession();
			result = (ShoppingMoney)session.createQuery(sqlString).list().get(0);
			session.close();
			
		} catch(Exception e) {
			logger.debug(e);
		}
		
		return result;
	}
}